-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Switch to tab implementation #3660
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mallexxx, this is really great feature, I love it! I added couple of comments below and would like to resolve a question of suggesting tabs between regular windows and Fire Windows in Asana.
Also, suggesting a pinned tab didn't work for me. Am I missing something?
@@ -486,6 +488,21 @@ final class AddressBarTextField: NSTextField { | |||
} | |||
} | |||
|
|||
private func switchTo(_ tab: OpenTab) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we encapsulate this logic somewhere else? (standalone class maybe?) It is slightly confusing to have logic for switching tabs in AddressBarTextField
@@ -52,8 +56,16 @@ final class SuggestionContainer { | |||
let urlFactory = { urlString in | |||
return URL.makeURL(fromSuggestionPhrase: urlString) | |||
} | |||
|
|||
self.init(suggestionLoading: SuggestionLoader(urlFactory: urlFactory), | |||
let openTabsProvider: OpenTabsProvider = { @MainActor in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would using WindowControllersManagerProtocol
make more sense here since other data are passed this way too?
@@ -787,6 +787,16 @@ extension TabCollectionViewModel { | |||
return nil | |||
} | |||
|
|||
func indexInAllTabs(where condition: (Tab) -> Bool) -> TabIndex? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍 Very useful
|
Task/Issue URL: https://app.asana.com/0/1202406491309510/1208236460435649/f
Tech Design URL: https://app.asana.com/0/72649045549333/1208270496320813/f
Description:
Steps to test this PR:
Definition of Done:
Internal references:
Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation